package graphics.datastructures;

import static org.junit.Assert.assertTrue;
import static util.MatrixOperationsF.ar;

import org.junit.Test;
public class TriangleTest {
	
		
	
	@Test
	public void testBoundingBox()
	{
		float[][] tri = new float[3][];
		tri[0] = ar(1,2,4);
		tri[1]= ar(-5,10,7);
		tri[2]= ar(1,2,-4);
		Triangle t = new Triangle(tri, tri);
		float[][] boundingBox=t.getBB();
		float[] lbn=boundingBox[0];
		float[] rtf=boundingBox[1];
		assertTrue(lbn[0]==-5);
		assertTrue(lbn[1]==2);
		assertTrue(lbn[2]==-4);
		assertTrue(rtf[0]==1);
		assertTrue(rtf[1]==10);
		assertTrue(rtf[2]==7);
	}
}
